using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter27
{
	/// <summary>
	/// Example07: Power in an Electric Heater
	/// An electric heater is constructed by applying a potential 
	/// difference of 120 V to a Nichrome wire that has a total 
	/// resistance of 8.00 \Omega. Find the current carried by 
	/// the wire and the power rating of the heater.
	/// </summary>
	public class Example07
	{
		public Example07()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.ElectricPotentialDifference V 
				= new L.ElectricPotentialDifference();
			V.V = 120.0;
			L.Resistance R = new L.Resistance();
			R.Ohm = 8.0;
			L.ElectricCurrent I = new L.ElectricCurrent(R,V);
            result+=Convert.ToString(I.A)+"\r\n";  
			L.ElectricPower P = new L.ElectricPower(R,I);
            result+=Convert.ToString(P.W)+"\r\n";  
		}
	}
}
